package cn.fuxue.hrms.common.entity;
import java.sql.Timestamp;
/**
 * @author 王文勇
 * @version 1.0
 * 工作流实例实体类
 */

public class WorkflowInstance {

    // 主键
    private int id;
    // 模板 ID，外键关联 workflow_template 表的 id
    private int templateId;
    // 业务键
    private String businessKey;
    // 当前节点 ID，外键关联 workflow_node 表的 id
    private Integer currentNodeId;
    // 实例状态
    private String status;
    // 最后修改人 ID
    private Integer modifyId;
    // 创建人 ID
    private Integer createId;
    // 是否删除，1 表示已删除，0 表示未删除
    private boolean isDeleted;
    // 创建时间
    private Timestamp createTime;
    // 更新时间
    private Timestamp updateTime;

    // 无参构造函数
    public WorkflowInstance() {
    }

    // 全参构造函数
    public WorkflowInstance(int id, int templateId, String businessKey, Integer currentNodeId,
                            String status, Integer modifyId, Integer createId, boolean isDeleted,
                            Timestamp createTime, Timestamp updateTime) {
        this.id = id;
        this.templateId = templateId;
        this.businessKey = businessKey;
        this.currentNodeId = currentNodeId;
        this.status = status;
        this.modifyId = modifyId;
        this.createId = createId;
        this.isDeleted = isDeleted;
        this.createTime = createTime;
        this.updateTime = updateTime;
    }

    // Getter 和 Setter 方法
    public int getId() {
        return id;
    }

    public void setId(int id) {
        this.id = id;
    }

    public int getTemplateId() {
        return templateId;
    }

    public void setTemplateId(int templateId) {
        this.templateId = templateId;
    }

    public String getBusinessKey() {
        return businessKey;
    }

    public void setBusinessKey(String businessKey) {
        this.businessKey = businessKey;
    }

    public Integer getCurrentNodeId() {
        return currentNodeId;
    }

    public void setCurrentNodeId(Integer currentNodeId) {
        this.currentNodeId = currentNodeId;
    }

    public String getStatus() {
        return status;
    }

    public void setStatus(String status) {
        this.status = status;
    }

    public Integer getModifyId() {
        return modifyId;
    }

    public void setModifyId(Integer modifyId) {
        this.modifyId = modifyId;
    }

    public Integer getCreateId() {
        return createId;
    }

    public void setCreateId(Integer createId) {
        this.createId = createId;
    }

    public boolean isDeleted() {
        return isDeleted;
    }

    public void setDeleted(boolean deleted) {
        isDeleted = deleted;
    }

    public Timestamp getCreateTime() {
        return createTime;
    }

    public void setCreateTime(Timestamp createTime) {
        this.createTime = createTime;
    }

    public Timestamp getUpdateTime() {
        return updateTime;
    }

    public void setUpdateTime(Timestamp updateTime) {
        this.updateTime = updateTime;
    }

    @Override
    public String toString() {
        return "WorkflowInstance{" +
                "id=" + id +
                ", templateId=" + templateId +
                ", businessKey='" + businessKey + '\'' +
                ", currentNodeId=" + currentNodeId +
                ", status='" + status + '\'' +
                ", modifyId=" + modifyId +
                ", createId=" + createId +
                ", isDeleted=" + isDeleted +
                ", createTime=" + createTime +
                ", updateTime=" + updateTime +
                '}';
    }
}